<?php
include("db.php");

$sql = "select name, note from etudiant";

$rs = mysql_query($sql) or die('Requête invalide : ' . mysql_error());

$arrG = array();
While ($arr = mysql_fetch_array($rs)){
	$arrG[] = $arr;
}

echo json_encode($arrG);